package com.gxuwz.zlc.service.impl;

import com.gxuwz.zlc.entity.RecruitmentPlan;
import com.gxuwz.zlc.mapper.RecruitmentPlanMapper;
import com.gxuwz.zlc.service.RecruitmentPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecruitmentPlanServiceImpl implements RecruitmentPlanService {

    @Autowired
    private RecruitmentPlanMapper recruitmentPlanMapper;

    @Override
    public List<RecruitmentPlan> findRecruitmentPlan() {
        return recruitmentPlanMapper.selectList(null);
    }

    @Override
    public RecruitmentPlan findRecruitmentPlanById(String planId) {
        return recruitmentPlanMapper.selectById(planId);
    }

    @Override
    public void addRecruitmentPlan(RecruitmentPlan recruitmentPlan) {
        recruitmentPlanMapper.insert(recruitmentPlan);
    }

    @Override
    public void updateRecruitmentPlan(RecruitmentPlan recruitmentPlan) {
        recruitmentPlanMapper.updateById(recruitmentPlan);
    }
}
